//所有与权限相关的接口

import instance from "@/utils/request";

//(1)根据ID更新权限点详情
export function updatePerApi(data) {
    return instance({
        url: `/sys/permission/${data.id}`,
        method: 'PUT',
        data
    })
}

//(2)根据ID获取权限点详情
export function getPerDetailApi(id) {
    return instance({
        url: `/sys/permission/${id}`,
        method: 'GET',
        
    })
}

//(3)根据id删除权限点
export function delPerApi(id) {
    return instance({
        url: `/sys/permission/${id}`,
        method: 'DELETE',
        
    })
}

//(4)添加权限点
export function addPerApi(data) {
    return instance({
        url: `/sys/permission`,
        method: 'POST',
        data
        
    })
}

//(5)获取所有权限点
export function getAllPerApi() {
    return instance({
        url: `/sys/permission`,
        method: 'get',
        
    })
}